﻿using BodaNetCommunications.CommBase.Interfaces;
using BodaNetCommunications.Utilities.ComTypes;

namespace BodaNetCommunications.CommBase
{
    /// <summary>
    /// 创建读写的程序
    /// </summary>
    public class NetworkFactory
    {
        /// <summary>
        /// 通过设备类型创建不通的通讯协议服务
        /// </summary>
        /// <param name="protoclType"></param>
        /// <returns></returns>
        public static IBodaNetWork CreateNetWork(ProtocolType protoclType)
        {
            IBodaNetWork bodaNetWork = null;
            switch (protoclType)
            {
                case ProtocolType.NoneDevice:
                    break;

                case ProtocolType.ModbusTcp:
                    break;

                case ProtocolType.ModbusRtu:
                    break;

                case ProtocolType.McQnA3E:
                    break;

                case ProtocolType.S7:
                    break;

                case ProtocolType.FinsTcp:
                    break;

                default:
                    break;
            }
            return bodaNetWork;
        }
    }
}